<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/8/14
  Time: 9:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <center>
        <h1>正在给学生${sb.sname}选择班级<br>
            （每班做多只能有5人，超过的请联系管理员）
        </h1>
        <form action="<c:url value='/updateStuGrade.do'/>" method="post">
            <input type="hidden" name="id" value="${sb.id}"/>
            班级：<select name="gid">
                    <option value="-1">--请选择--</option>
                    <c:forEach var="g" items="${list}">
                        <option ${g.sbs.size()>=5?'disabled':''}  value="${g.gid}" ${sb.gb.gid==g.gid?'selected':''}>${g.gname}(改班级已有${g.sbs.size()}人)
                            <c:if test="${g.sbs.size()>=5}">该班级已满员不能在进人了</c:if>
                        </option>
                    </c:forEach>
                 </select>
            <input type="submit" id="usgbt" value="提交"/>
        </form>
    </center>
</body>
</html>
